import { createRouter, RouteRecordRaw, createWebHashHistory,NavigationGuardNext  } from "vue-router";
import homeChildrenRoutes from "./data"; // 导入 home 子路由

const routes = [
	{
		path: "/",
		component: () => import("../view/system/index.vue"),
		name: "home",
		redirect:'/page/page11',
		children: homeChildrenRoutes, // 使用导入的子路由,
	},
	{
		path: "/login",
		component: () => import("../view/login/login.vue"),
		name: "login",
	}
];

const router = createRouter({
	history: createWebHashHistory(), //哈希值模式
	routes,
});

export default router;